export const onMessage = (message, ws, id, socket) => {
    const data = JSON.parse(message.utf8Data)
    data.userId = id
    const { toUserId } = data
    const beSocket = socket.find(v => v.id == toUserId)

    beSocket.ws.sendUTF(JSON.stringify(data));
}
